<link rel="stylesheet" type="text/css" href="assets/bootstrap-datepicker/css/datepicker.css" />
<!-- 主页-协议采购清单验收-办理 -->
<section id="container">
    <!--main content start-->
    <section id="main-content">
        <section class="wrapper">
            <!--state overview end-->
            <div class="row">
                <div class="col-lg-12">

                    <section class="panel">
                        <header class="panel-heading">
                            报价协议信息
                        </header>
                        <div class="panel-body">
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">报价协议/合同编号</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" placeholder="自动检索" ng-model="receive.contractCode"
                                        disabled>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">供应商名称</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" ng-model="receive.supplieName" disabled>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">验收地点</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" ng-model="receive.acceptanceAddr"
                                        certus-required certus-an-limit-length="50">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">验收日期</label>
                                <div class="col-sm-10">
                                    <input type="text" id="xyTime" class="form-control" ng-model="receive.acceptDate"
                                        certus-required certus-an-limit-length="50">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">备注</label>
                                <div class="col-sm-10">
                                    <textarea class="form-control" maxlength="120" ng-model="receive.descRemark"></textarea>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">验收意见*</label>
                                <div class="col-sm-10">
                                    <ul class="yslist">
                                        <li>
                                            1*、设备的品牌、外观、规格数量、配件是否正确?
                                            <select ng-model="receive.isEquipment" certus-required>
                                                <option ng-repeat="a in yesOrNoSelect" value="{{a.code}}">
                                                    {{a.name}}
                                                </option>
                                            </select>
                                        </li>
                                        <li>
                                            2*、经安装调试后的设备运行是否正常？
                                            <select ng-model="receive.working" certus-required>
                                                <option ng-repeat="a in yesOrNoSelect" value="{{a.code}}">
                                                    {{a.name}}
                                                </option>
                                            </select>
                                        </li>
                                        <li>
                                            3*、技术资料是否齐全？
                                            <select ng-model="receive.informationComp" certus-required>
                                                <option ng-repeat="a in yesOrNoSelect" value="{{a.code}}">
                                                    {{a.name}}
                                                </option>
                                            </select>
                                        </li>
                                        <li>
                                            4*、验收是否合格？
                                            <select ng-model="receive.qualified" certus-required>
                                                <option ng-repeat="a in yesOrNoSelect" value="{{a.code}}">
                                                    {{a.name}}
                                                </option>
                                            </select>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </section>

                    <section class="panel">
                        <header class="panel-heading">
                            采购清单
                        </header>
                        <div class="panel-body">
                            <div id="purchaselistContainer" class="dlshouwen-grid-container"></div>
                            <!-- <div id="purchaselistToolBarContainer" class="dlshouwen-grid-toolbar-container"></div> -->
                        </div>
                    </section>

                    <section class="panel shuplod" style="display:none;">
                        <div class="panel-heading">
                            验收信息
                        </div>
                        <div class="panel-body">
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">设备名称</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" certus-required-polyfill
                                        certus-an-limit-length="50" ng-model="receiveItem.equipmentName">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">规格参数</label>
                                <div class="col-sm-10">
                                    <textarea class="form-control" certus-required-polyfill certus-an-limit-length="50"
                                        ng-model="receiveItem.specification"></textarea>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">实收数量</label>
                                <div class="col-sm-10">
                                    <input type="number" class="form-control" certus-required-polyfill
                                        certus-an-limit-length-num="50" ng-model="receiveItem.receivedNum">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">单位</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" placeholder="请填写计数单位,例如:个、台等……"
                                        certus-required-polyfill certus-an-limit-length="50" ng-model="receiveItem.unit">
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">采购单位</label>
                                <div class="col-sm-10">
                                    <select class="form-control" certus-required-polyfill ng-model="receiveItem.purchasePromise">
                                        <option ng-repeat="xx in qualifiedSelect" value="{{xx.code}}">{{xx.name}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">验收单位</label>
                                <div class="col-sm-10">
                                    <select class="form-control" certus-required-polyfill ng-model="receiveItem.acceptPromise">
                                        <option ng-repeat="xx in qualifiedSelect" value="{{xx.code}}">{{xx.name}}
                                        </option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group customerForm">
                                <label class="col-sm-2 control-label">备注 (固定资产编号)</label>
                                <div class="col-sm-10">
                                    <textarea class="form-control" ng-model="receiveItem.remark"
                                        certus-required-polyfill certus-an-limit-length="50"></textarea>
                                </div>
                            </div>
                            <p class="default-buttons">
                                <a href="javascript:void(0);" class="button-back  btn btn-info" onclick="shuplod()">取消</a>
                                <a href="javascript:void(0);" class="button-next  btn btn-info" ng-click="saveReceiveItem()">确认</a>
                            </p>
                        </div>
                    </section>

                    <section class="panel">
                        <header class="panel-heading">
                            验收清单
                        </header>
                        <div class="panel-body">
                            <div id="yslistContainer" class="dlshouwen-grid-container"></div>
                            <!-- <div id="yslistToolBarContainer" class="dlshouwen-grid-toolbar-container"></div> -->
                        </div>
                    </section>

                    <section class="panel">
                        <div class="panel-body">
                            <p class="default-buttons">
                                <a href="javascript:void(0);" class="button-back btn btn-info" onclick="window.history.back()">返回</a>
                                <a href="javascript:void(0);" class="button-next  btn btn-success btn-l10" ng-click="receiveSave()">确认</a>
                                <!-- <a href="javascript:void(0);" class="button-next btn btn-success" onclick="pryslGridCheckedRecordsLength();">打印设备验收单</a> -->
                            </p>
                        </div>
                    </section>

                </div>
            </div>
        </section>
    </section>
    <!--main content end-->
</section>

<script type="text/javascript" src="js/receive/receive.js"></script>
<script type="text/javascript" src="assets/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script>
    //时间控件
//    $('#xyTime').datepicker({
//        format: 'yyyy-mm-dd'
//    }).on("");

    var picker2 = $('#xyTime').datetimepicker({
        format: 'YYYY-MM-DD',
        locale: moment.locale('zh-cn')
    }).on('dp.change', function (e) {
        var result = new moment(e.date).format('YYYY-MM-DD');
        if (result && !angular.isUndefined(result)) {
            $$scope.receive.acceptDate = result;
            $$scope.$apply();
            //console.log(result);
        }
    })
</script>